package main

import (
	"fmt"
)

type A struct{
	Name string
	Age int
}


type B struct{
	Name string
	Score int
}

type C struct{
	A
	B
}

type D struct{// 继承的时候 可以写成 指针类型 
	*A
	*B
}
func main(){
	var c C=C{
		A{
			Name:"lyy",
			Age:123,
		},
		B{
			Name:"asd",
			Score:123,
		},
	}
	fmt.Println(c)
	var d D=D{
		&A{
			Name:"lyy",
			Age:123,
		},
		&B{
			Name:"asd",
			Score:123,
		},
	}
	fmt.Println(d.A)
}